package com.jizhang.controller;


import com.jizhang.base.model.BaseModel;
import com.jizhang.service.CateService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 郭博民
 * @since 2022-07-15
 */
@RestController
@RequestMapping("/cate")
public class CateController {
    SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
    @Autowired
    CateService cateService;

    //分页查询对应类别下所有题目
    @ApiOperation(value = "分页查询对应题目", httpMethod = "GET")
    @GetMapping("/findCate")
    public BaseModel findCate(BaseModel baseModel) throws Exception {
        System.out.println("执行查询cate操作"+df.format(new Date()));
        return cateService.findCate(baseModel);
    }

}
